﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("CSMSTask")]
    public class CSMSTask : BaseEntity
    {
        /// <summary>
        /// 项目Id
        /// </summary>
        [Column(TypeName = "uuid")]
        public Guid? ProjectId { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        [Column(TypeName = "uuid")]
        public Guid DeviceGuid { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        [Key]
        [Column(TypeName = "uuid")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid TaskId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string TaskName { get; set; }

        /// <summary>
        ///
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsMobileInputManualMeasurement { get; set; }

        ///// <summary>
        /////
        ///// </summary>
        //[Column(TypeName = "uuid")]
        //public Guid MobileInputUserGuid { get; set; }

        //[Column(TypeName = "varchar(500)")]
        //public string MobileInputUserName { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "int")]
        public int ManualMeasurementStatus { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "text")]
        public string HouseMapImagePath { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "text")]
        public string JsonSourceFilePath { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "text")]
        public string JsonResultFilePath { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "timestamp(0)")]
        public DateTime? SurfaceUploadDate { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "timestamp(0)")]
        public DateTime? AppUploadDate { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "uuid")]
        public Guid HouseMapId { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "varchar(4000)")]
        public string ResultDataFilePath { get; set; }

        /// <summary>
        /// 是否删除报告
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsDeleteReport { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsDeleteCloudPoint { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsNew { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsApproved { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsCompressedAllCloudPointFile { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "timestamp(0)")]
        public DateTime? ReportUploadDateTime { get; set; }

        /// <summary>
        /// 移动端人工录入用户
        /// </summary>
        [Column(TypeName = "bool")]
        public bool IsDecompressionTaskData { get; set; } = false;

        /// <summary>
        /// 工程阶段
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string ProjectStage { get; set; }

        /// <summary>
        /// 楼栋名称
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string BuildingName { get; set; }

        /// <summary>
        /// 楼层名称
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string FloorName { get; set; }

        /// <summary>
        /// 任务执行类型，‘1’：一键测量（采算），‘2’：只采
        /// </summary>
        [Column(TypeName = "varchar(5)")]
        public string TaskExecutionType { get; set; }

        /// <summary>
        /// 任务分类，0：实测实量任务，1:机器人任务；2:建模任务；3:排版任务；4:外立面任务
        /// </summary>
        [Column(TypeName = "varchar(10)")]
        public string MeasureType { get; set; }
    }
}